package com.chc.web.borrow.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.chc.web.borrow.entity.Borrow;
import com.chc.web.borrow.entity.BorrowParm;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created with IntelliJ IDEA
 *
 * @Author: chc
 * @Date: 2022/04/22/17:42
 * @Description:
 */
public interface BorrowMapper extends BaseMapper<Borrow> {

    int addBorrow(List<Borrow> list);

    //查询未审核和已审核的图书数据
    IPage<BorrowParm> getBorrowLook(IPage<BorrowParm> page,@Param("id")Long id, @Param("cardid")Long cardid, @Param("readerName")String readerName, @Param("bookName")String bookName, @Param("state")Long state);

    //查询已通过审核的图书
    IPage<BorrowParm> getReturnBook(IPage<BorrowParm> page, @Param("cardid")Long cardid, @Param("readerName")String readerName, @Param("bookName")String bookName, @Param("state")Long state);
}
